
import 'package:flutter/material.dart';


class InputField extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Column(
      children: <Widget>[
        Padding(
          padding: const EdgeInsets.fromLTRB(0, 20, 0, 0), //上边部分填充
          child: TextField(
            style: TextStyle(fontSize: 12, color: Colors.black87), //文字大小、颜色
            decoration: InputDecoration(
              filled: true, //必须设置为true，fillColor才有效
              fillColor: Colors.grey[80], //背景颜色
              hintText: "邮箱或手机号",
              ///设置输入框可编辑时的边框样式
              enabledBorder: OutlineInputBorder(
                borderRadius: BorderRadius.circular(20.0), //输入框圆角
                borderSide: BorderSide(), //输入框白色隐藏
              ),
            ),
          ),
        ),
        Padding(
          //设置内边距
          padding: const EdgeInsets.fromLTRB(0, 20, 0, 0),
          child: TextField(
            obscureText: true,
            style: TextStyle(fontSize: 12, color: Colors.black87), //文字大小、颜色
            decoration: InputDecoration(
              filled: true, //必须设置为true，fillColor才有效
              fillColor: Colors.grey[80], //背景颜色
              hintText: "密码",
              ///设置输入框可编辑时的边框样式
              enabledBorder: OutlineInputBorder(
                  borderRadius: BorderRadius.circular(20.0), //输入框圆角
                  borderSide: BorderSide() //输入框白色隐藏
              ),
            ),
          ),
        ),
      ],
    );
  }

}
